const express = require('express')
const path = require('path')
const app = express()
app.listen(3000, '0.0.0.0', () => console.log('http://localhost:3000'))
app.use(express.static('./public'))
app.use(express.urlencoded({ extended: false }))
app.use(express.json())

app.get('/now', (req, res) => {

  setInterval(() => {
    res.write(`<script>
    parent.document.getElementById('root').innerHTML = ${Date.now()}
  </script>`)
  }, 1000);
})
